import request from "axios";

export default {
  getIndexNotice(data) {
    return request({
      url: "/study/index/notice",
      method: "GET",
      params: data
    });
  },
  getIndexEvents(data) {
    return request({
      url: "/study/index/event",
      method: "GET",
      params: data
    });
  },
  getIndexGuide(data) {
    return request({
      url: "/study/index/guide",
      method: "GET",
      params: data
    });
  },
  getNoticeMsg(data) {
    return request({
      url: "/study/index/getNoticeMsg",
      method: "GET",
      params: data
    });
  },
  getEventMsg(data) {
    return request({
      url: "/study/index/getEventMsg",
      method: "GET",
      params: data
    });
  },
  getGuideMsg(data) {
    return request({
      url: "/study/index/getGuideMsg",
      method: "GET",
      params: data
    });
  },
  getNoticeList(data) {
    return request({
      url: "/study/index/noticeList",
      method: "GET",
      params: data
    });
  },
  getGuidePage(data) {
    return request({
      url: "/study/index/guideList",
      method: "GET",
      params: data
    });
  },
  findLSpeakerMsg() {
    return request({
      url: "/study/index/findLSpeakerMsg",
      method: "GET"
    });
  },
  lBookInfoList(data) {
    return request({
      url: "/study/index/lBookInfoList",
      method: "GET",
      params: data
    });
  },
  getJinrishiciToken() {
    var token = window.localStorage.getItem("jinrishici-token");
    return request({
      url: "https://v2.jinrishici.com/token",
      method: "GET"
    });
  },
  getJinrishici() {
    var token = window.localStorage.getItem("jinrishiciToken");
    return request({
      url: "https://v2.jinrishici.com/sentence",
      method: "GET",
      headers: {
        "Content-Type": "application/json",
        Authorization: "Bearer " + token
      }
    });
  }
};
